<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: pl125 <xskjs888@163.com>
// +----------------------------------------------------------------------

namespace api\user\model;

use api\common\model\CommonModel;

class UserAddressModel extends CommonModel
{
	/**
     * createtime 自动转化
     * @param $value
     * @return string
     */
    protected $id;
    public function getCreatetimeAttr($value)
    {
        if (!empty($value)) {
            $value = date('Y-m-d H:i:s',$value);
        }

        return $value;
    }
    
    public function setUseraddress($data)
    {
        //获取收藏内容信息
        $UserAddress = self::create($data);
        return $UserAddress->id;
    }
}
